package com.airlines.crewassignment.domain;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.airlines.base.config.jsr303.EntityUpdateView;

/**
 * @author xxxx
 * @date 2018年3月26日 
 * @description 核心类之一，每个机组连线的号位
 */

 
public class Position implements Serializable{
	private static final long serialVersionUID = -3985570890736162014L;

	private String  positionKey;//由于目前没有号位主键，则 MD5(flightDate+crewLinkLineNo + dutyCode + serialNo)为主键
	
	@NotNull (groups={EntityUpdateView.class})
	private Integer positionId; 
	@NotNull  private Date flightDate;
	@NotNull private Integer crewLinkLineNo;
	@NotBlank private String dutyCode;  //号位职责分类 F飞行员 C乘务员 A安全员
	@NotBlank private String workcode;  //该号位对应的飞行员工号
	private String pCode;
	@NotNull private Integer serialNo; //号位，每个LinkLine 下  每种dutyCode 下， serialNo 唯一
	@NotBlank private String rankNo;    //该连线下该号位的职责，例如  A001	机长 ，B001	第二机长，H001	乘务长，H003	乘务员
	private String TsFlag; //教检学标志
	private String TsFlagName; //教检学标志中文
	private String checkThing;//检查科目
	private String checkThingName;//检查科目中文
	private String autoFlag;// 排班标志(A－自动、H－手工、N－过夜带出)
	private String confirmFlag;//逐步提交标志（N-排班、S-提交 Y－网上可见）
	private String status;//任务书录入（A－未录、F－录入）
	private Integer flyHours;//飞行时长，单位分钟
	
	//其他计算属性值
	private LinkLine linkLine;
	private String  crewLinkLineKey; //MD5(flightDate+crewLinkLineNo)
	private Tech techLowest;  //该号位最低的排班授权（包含techLowest）
	private Tech techHighest;  //该号位最高的排班授权（包含techHighest）
	private Skill skillLowest;	   //该号位所需要的最低技术能力	
	
	
	private Crew crew;
	 
    public Position(){
    	
    }

	public String getPositionKey() {
		return positionKey;
	}

	public void setPositionKey(String positionKey) {
		this.positionKey = positionKey;
	}

	public Integer getPositionId() {
		return positionId;
	}

	public void setPositionId(Integer positionId) {
		this.positionId = positionId;
	}

	public Date getFlightDate() {
		return flightDate;
	}

	public void setFlightDate(Date flightDate) {
		this.flightDate = flightDate;
	}

	public Integer getCrewLinkLineNo() {
		return crewLinkLineNo;
	}

	public void setCrewLinkLineNo(Integer crewLinkLineNo) {
		this.crewLinkLineNo = crewLinkLineNo;
	}

	public String getDutyCode() {
		return dutyCode;
	}

	public void setDutyCode(String dutyCode) {
		this.dutyCode = dutyCode;
	}

	public String getWorkcode() {
		return workcode;
	}

	public void setWorkcode(String workcode) {
		this.workcode = workcode;
	}

	public String getPCode() {
		return pCode;
	}

	public void setPCode(String pCode) {
		this.pCode = pCode;
	}

	public Integer getSerialNo() {
		return serialNo;
	}

	public void setSerialNo(Integer serialNo) {
		this.serialNo = serialNo;
	}

	public String getRankNo() {
		return rankNo;
	}

	public void setRankNo(String rankNo) {
		this.rankNo = rankNo;
	}

	public String getTsFlag() {
		return TsFlag;
	}

	public void setTsFlag(String tsFlag) {
		TsFlag = tsFlag;
	}

	public String getTsFlagName() {
		return TsFlagName;
	}

	public void setTsFlagName(String tsFlagName) {
		TsFlagName = tsFlagName;
	}

	public String getCheckThing() {
		return checkThing;
	}

	public void setCheckThing(String checkThing) {
		this.checkThing = checkThing;
	}

	public String getCheckThingName() {
		return checkThingName;
	}

	public void setCheckThingName(String checkThingName) {
		this.checkThingName = checkThingName;
	}

	public String getAutoFlag() {
		return autoFlag;
	}

	public void setAutoFlag(String autoFlag) {
		this.autoFlag = autoFlag;
	}

	public String getConfirmFlag() {
		return confirmFlag;
	}

	public void setConfirmFlag(String confirmFlag) {
		this.confirmFlag = confirmFlag;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getFlyHours() {
		return flyHours;
	}

	public void setFlyHours(Integer flyHours) {
		this.flyHours = flyHours;
	}

	public LinkLine getLinkLine() {
		return linkLine;
	}

	public void setLinkLine(LinkLine linkLine) {
		this.linkLine = linkLine;
	}

	public String getCrewLinkLineKey() {
		return crewLinkLineKey;
	}

	public void setCrewLinkLineKey(String crewLinkLineKey) {
		this.crewLinkLineKey = crewLinkLineKey;
	}

	public Tech getTechLowest() {
		return techLowest;
	}

	public void setTechLowest(Tech techLowest) {
		this.techLowest = techLowest;
	}

	public Tech getTechHighest() {
		return techHighest;
	}

	public void setTechHighest(Tech techHighest) {
		this.techHighest = techHighest;
	}

	public Skill getSkillLowest() {
		return skillLowest;
	}

	public void setSkillLowest(Skill skillLowest) {
		this.skillLowest = skillLowest;
	}

	public Crew getCrew() {
		return crew;
	}

	public void setCrew(Crew crew) {
		this.crew = crew;
	}
    
    
}
